$(function(){
	var customerName = $.getLoginInfo("customerName");
	if(customerName){
		$('#mes-a-1 p').first().html('HI:'+customerName);
	}else{
		$('#mes-a-1 p').first().html('HI:'+_sn);
	}
	$('#mes-a-1 p').eq(1).html(lang.index.message+'(0)');
	
	$('#mes-a-1').focus(function(e) {
        KEY.CURTYPE = false;
    }).click(function(e) {
		$.gotoPage("message/index.html");
        return false;
    });
	
	var url = 	config.webUrl + '/channel/stb/getMessage.htm?sn='+_sn;
	$.ajax({
		url:url,
		dataType:"json",
		success:function(obj){
			var list = obj.messageList;
			$.setSession("messageList",$.toJSON(list)); $.log($.getSession("messageList"));
			$('#mes-a-1 p').eq(1).html(lang.index.message+'('+list.length+')');
		},error:function(){
			
		}
	});
});